#ifndef FIIPLISTENER_H
#define FIIPLISTENER_H
#include <stdint.h>
#include <stdlib.h>
#include "./fiip.h"
#include "./frame/format.h"
#include "./link/link.h"
#include "riselib/mempool.h"

#ifdef __cplusplus
extern "C" {
#endif

#define FIIPLISTENERS_LEN_MAX 64

typedef struct {
  uint16_t cmd;
  void (*fun)(Format_FieldStruct* msg);
} FiipListenerStruct;  //监听器结构体

void fiipListener_add(uint16_t cmd, void (*fun)(Format_FieldStruct* msg));
void fiipListener_solve(Format_FieldStruct* fiipMsg, LinkCfgStruct* link);

#ifdef __cplusplus
}
#endif
#endif  //FIIPLISTENER_H
